shader "Volumetric/vol in"

{
    Properties
    {
        _Color ("Main Color", Color) = (1,1,1,1)
        _MainTex ("Base", 2D) = "white" { } 
		//_Dist ("Distane modificator", Range(0,1)) = 0
		_Alpha ("Alpha", Range(0,1)) = 0
		_Scale ("Scale", Range(0,3)) = 1
	}

    Category
    {
        ZWrite Off
        ZTest Always
		Blend one one
		Tags {"RenderType"="Transparent" "Queue"="Transparent"}
		Cull back

        SubShader
        {
		ZWrite Off
		ZTest Always
		cull front
		Lighting Off

		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment fragI
				#define _Dist  0
				#define _Power 40
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment fragI
				#define _Dist  0.05
				#define _Power 40
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment fragI
				#define _Dist  0.025
				#define _Power 40
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment fragI
				#define _Dist  0.075
				#define _Power 40
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
			
        }

        SubShader
        {
        ZWrite Off
		ZTest Always
		Blend one one
		Tags {"Queue" = "Overlay" }
			Pass
			{
				Cull front
				Lighting Off

				SetTexture [_MainTex]
				{
					ConstantColor ([_Alpha],[_Alpha],[_Alpha],[_Alpha])
					combine constant
				}
			}
			
        } 
    }
}